<!--文章列表 START-->
<div class="object-item" data-type="articles_list" data-object-index="articles_list-{$key}">
	<div class="object-drag articles-list">
        <div class="articles-list-preview">
            <div class="title clearfix">
                <h3>{$vars['data']['title']}</h3>
                <small class="more">查看更多 </small>
            </div>
            <div class="list rank{$vars['data']['rank']|default=0} clearfix">
			{notempty name="vars.data.list"}
            {foreach $vars['data']['list'] as $key=>$article_data}
            {if $vars['data']['style'] == 0}
                <div class="item small" data-type="article_list_item" data-id="{$article_data['id']}">
                        
                    <div class="image" style="background-image:url({$article_data['cover_200']})"></div>
                    <div class="content">
                        <div class="title h3 text-ellipsis-2">{$article_data['title']}</div>
                        <div class="info">
                            <div class="category">{$article_data['category']['title']}</div>
                            <div class="pop-info">
                                <div class="view">
                                    <i class="fa fa-eye" aria-hidden="true"></i> {$article_data['view']}
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            {/if}
            {if $vars['data']['style'] == 1}
                <div class="item big" data-type="article_list_item" data-id="{$article_data['id']}">
                    <div class="image">
                        <img src="{$article_data['cover_800']}" />
                        <div class="type-container">{$article_data['category']['title']}</div>
                    </div>
                    <div class="content">
                        <div class="title h3 text-ellipsis">{$article_data['title']}</div>
                        <div class="description text-ellipsis">{$article_data['description']}</div>
                        <div class="info">
                            <div class="type">
                                <div class="view">
                                    <i class="fa fa-eye" aria-hidden="true"></i> {$article_data['view']}
                                </div>
                            
                                <div class="favorites">
                                    <i class="fa fa-star-o" aria-hidden="true"></i>
                                    <span class="favorites-num">{$article_data['favorites']}</span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            {/if}
            {/foreach}
			{/notempty}
            </div>
        </div>
	</div>
	{if $vars['dev'] == true}
	<div class="diy-preview-controller articles-list">
		<div class="panel panel-info">
		 	<div class="panel-heading">
		    文章列表
		 	</div>
		 	<div class="panel-body">
                <form class="form-horizontal" data-type="articles_list">
					<input type="hidden" name="app" value="articles"/>
					<input type="hidden" name="type_title" value="文章列表"/>
					<input type="hidden" name="type" value="articles_list"/>
					<div class="form-group">
					    <label class="col-sm-3">标题</label>
					    <div class="col-sm-9">
					    	<input type="text" class="form-control" name="title" value="{$vars['data']['title']|default=''}">
					    </div>
				  	</div>
			 		
				  	<div class="form-group">
					    <label class="col-sm-3">文章分类</label>
					    <div class="col-sm-9">
						   	<select class="form-control" name="category_id" data-category-id="{$vars['data']['category_id']|default=0}">
								<option value="0">所有</option>
								{notempty name="$vars.data.category_tree"}
								{volist name="$vars['data']['category_tree']" id="v"}
								{if $vars['data']['category_id'] == $v['id']}
								<option value="{$v['id']}" selected><b>{$v['title']}</b></option>
								{else}
								<option value="{$v['id']}"><b>{$v['title']}</b></option>
								{/if}
								{notempty name="$v._child"}
									{volist name="$v['_child']" id="_v"}
									{if $vars['data']['category_id'] == $_v['id']}
									<option value="{$_v['id']}" selected>|----{$_v['title']}</option>
									{else}
									<option value="{$_v['id']}">|----{$_v['title']}</option>
									{/if}
									{/volist}
								{/notempty}
								{/volist}
								{/notempty}
							</select>
					    </div>
				  	</div>

				  	<div class="form-group">
					    <label class="col-sm-3">显示数量</label>
					    <div class="col-sm-9">
					    	<input type="text" class="form-control" name="rows" value="{$vars['data']['rows']|default=2}">
					    </div>
				  	</div>
				  	<div class="form-group">
					    <label class="col-sm-3">排序方法</label>
					    <div class="col-sm-9">
						    <select class="form-control" name="order_field">
								{if $vars['data']['order_field']=='create_time'}
						    	<option value="create_time" selected>发布时间</option>
						    	{else}
						    	<option value="create_time">发布时间</option>
						    	{/if}

						    	{if $vars['data']['order_field']=='update_time'}
						    	<option value="update_time" selected>更新时间</option>
						    	{else}
						    	<option value="update_time">更新时间</option>
						    	{/if}

						    	{if $vars['data']['order_field']=='view'}
						    	<option value="view" selected>浏览量</option>
						    	{else}
						    	<option value="view">浏览量</option>
						    	{/if}

						    	{if $vars['data']['order_field']=='support'}
						    	<option value="support" selected>点赞量</option>
						    	{else}
						    	<option value="support">点赞量</option>
						    	{/if}
							</select>
					    </div>
				  	</div>
				  	<div class="form-group">
					    <label class="col-sm-3">排序方向</label>
					    <div class="col-sm-9">
						    <select class="form-control" name="order_type">
								{if $vars['data']['order_type']=='ASC'}
						    	<option value="ASC" selected>正序</option>
						    	{else}
						    	<option value="ASC">正序</option>
						    	{/if}

						    	{if $vars['data']['order_type']=='DESC'}
						    	<option value="DESC" selected>倒序</option>
						    	{else}
						    	<option value="DESC">倒序</option>
						    	{/if}
							</select>
					    </div>
				  	</div>
				  	
					<div class="form-group style-chonse">
					    <label class="col-sm-3">样式选择</label>
					    <div class="col-sm-9">
						    <select class="form-control" name="style">
								{if $vars['data']['style']==0}
						    	<option value="0" selected>小图</option>
						    	{else}
						    	<option value="0">小图</option>
						    	{/if}

								{if $vars['data']['style']==1}
								<option value="1" selected>大图</option>
								{else}
								<option value="1">大图</option>
								{/if}
							</select>
					    </div>
				  	</div>
				  	<div class="form-group">
					    <label class="col-sm-3"></label>
					    <div class="col-sm-9">
					      <button type="button" class="btn btn-primary">确认</button>
					    </div>
				  	</div>
                </form>
			</div>
		</div>
	</div>
	<div class="action">
        <div class="del-btn"><i class="fa fa-times-circle fa-2x"></i></div>
        <div class="up-btn"><i class="fa fa-chevron-circle-up fa-2x"></i></div>
        <div class="down-btn"><i class="fa fa-chevron-circle-down fa-2x"></i></div>
    </div>
	{/if}
</div>
<!--文章列表END-->
